package com.study.创造型模式.原型模式.改进;



public class Client {

    public static void main(String[] args) {
        System.out.println("原型模式完成对象的创建");
        Sheep sheep = new Sheep("tom", 1, "白色");
        try {
            Sheep sheep2 = (Sheep) sheep.clone();
            Sheep sheep3 = (Sheep) sheep.clone();
            Sheep sheep4 = (Sheep) sheep.clone();
            Sheep sheep5 = (Sheep) sheep.clone();
            Sheep sheep6 = (Sheep) sheep.clone();

            System.out.println(sheep);
            System.out.println(sheep2);
            System.out.println(sheep3);
            System.out.println(sheep4);
            System.out.println(sheep5);
            System.out.println(sheep6);
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }


    }
}
